import request from '@/utils/request'

// 入库列表
export function getConfigLevel3(id) {
  return request({
    url: 'storehouse/warehousingSon/get_config_level3/' + id,
    method: 'get'
  })
}

// 入库列表
export function warehousingList(data) {
  return request({
    url: 'storehouse/warehousing/index',
    method: 'post',
    data: data
  })
}

// 入库添加
export function warehousingAdd(data) {
  return request({
    url: 'storehouse/warehousing/create',
    method: 'post',
    data: data
  })
}
// 入库详情
export function warehousingDetail(data) {
  return request({
    url: 'storehouse/warehousing/in_detail',
    method: 'post',
    data: data
  })
}

// 入库编辑
export function warehousingEdit(data) {
  return request({
    url: 'storehouse/warehousing/update',
    method: 'post',
    data: data
  })
}

// 入库删除
export function warehousingDel(data) {
  return request({
    url: 'storehouse/warehousing/delete',
    method: 'post',
    data: data
  })
}

// 入库明细列表
export function warehousingSonList(data) {
  return request({
    url: 'storehouse/warehousingSon/index',
    method: 'post',
    data: data
  })
}

// 入库明细添加
export function warehousingSonAdd(data) {
  return request({
    url: 'storehouse/warehousingSon/create',
    method: 'post',
    data: data
  })
}

// 入库明细编辑
export function warehousingSonEdit(data) {
  return request({
    url: 'storehouse/warehousingSon/update',
    method: 'post',
    data: data
  })
}

// 入库明细删除
export function warehousingSonDel(data) {
  return request({
    url: 'storehouse/warehousingSon/delete',
    method: 'post',
    data: data
  })
}

// 打印信息
export function warehousingSonPrint(data) {
  return request({
    url: 'storehouse/WarehousingSon/print',
    method: 'post',
    data: data
  })
}

// 商品总数量剩余数
export function goodsNumber(data) {
  return request({
    url: 'storehouse/warehousingSon/goodsNumber',
    method: 'post',
    data: data
  })
}

// 分托盘列表
export function trayList(data) {
  return request({
    url: 'storehouse/tray/index',
    method: 'post',
    data: data
  })
}

// 分托盘添加
export function trayAdd(data) {
  return request({
    url: 'storehouse/tray/create',
    method: 'post',
    data: data
  })
}

// 分托盘编辑
export function trayEdit(data) {
  return request({
    url: 'storehouse/tray/update',
    method: 'post',
    data: data
  })
}

// 分托盘删除
export function trayDel(data) {
  return request({
    url: 'storehouse/tray/delete',
    method: 'post',
    data: data
  })
}

// 剩余商品数和包装数量和总数
export function traySurplus(data) {
  return request({
    url: 'storehouse/tray/surplus',
    method: 'post',
    data: data
  })
}

//
export function warehouseOutList(data) {
  return request({
    url: 'storehouse/warehouseOut/index',
    method: 'post',
    data: data
  })
}
// 出库详情
export function warehouseOutDetail(data) {
  return request({
    url: 'storehouse/warehouseOut/out_detail',
    method: 'post',
    data: data
  })
}
export function createWarehouseOut(data) {
  return request({
    url: 'storehouse/warehouseOut/create',
    method: 'post',
    data: data
  })
}
export function updateWarehouseOut(data) {
  return request({
    url: 'storehouse/warehouseOut/update',
    method: 'post',
    data: data
  })
}
export function delWarehouseOut(data) {
  return request({
    url: 'storehouse/warehouseOut/delete',
    method: 'post',
    data: data
  })
}
//
export function warehouseOutSonList(data) {
  return request({
    url: 'storehouse/warehouseOutSon/index',
    method: 'post',
    data: data
  })
}
export function createWarehouseOutSon(data) {
  return request({
    url: 'storehouse/warehouseOutSon/create',
    method: 'post',
    data: data
  })
}
export function updateWarehouseOutSon(data) {
  return request({
    url: 'storehouse/warehouseOutSon/update',
    method: 'post',
    data: data
  })
}
export function delWarehouseOutSon(data) {
  return request({
    url: 'storehouse/warehouseOutSon/delete',
    method: 'post',
    data: data
  })
}
// 一键出库
export function warehouseOutSonWhole(data) {
  return request({
    url: 'storehouse/warehouseOutSon/wholeOut',
    method: 'post',
    data: data
  })
}

// 拣货详情
export function getIndexlist(data) {
  return request({
    url: 'stock/pick/indexlist',
    method: 'post',
    data: data
  })
}

export function getProject(data) {
  return request({
    url: 'storehouse/project/getProject',
    method: 'post',
    data: data
  })
}

export function project(data) {
  return request({
    url: 'storehouse/project/project',
    method: 'post',
    data: data
  })
}

// 项目数据列表
export function projectList(data) {
  return request({
    url: 'storehouse/project/index',
    method: 'post',
    data: data
  })
}

// 项目数据添加
export function projectAdd(data) {
  return request({
    url: 'storehouse/project/create',
    method: 'post',
    data: data
  })
}

// 项目数据修改
export function projectEdit(data) {
  return request({
    url: 'storehouse/project/update',
    method: 'post',
    data: data
  })
}

// 项目数据删除
export function projectDel(data) {
  return request({
    url: 'storehouse/project/delete',
    method: 'post',
    data: data
  })
}

// 添加入库子单
export function createAdd(data) {
  return request({
    url: 'storehouse/warehousingSon/createAdd',
    method: 'post',
    data: data
  })
}

// 全部入库
export function goStockAll(data) {
  return request({
    url: 'storehouse/warehousingSon/goStockAll',
    method: 'post',
    data: data
  })
}

// 子单删除
export function createDel(data) {
  return request({
    url: 'storehouse/warehousingSon/createDel',
    method: 'post',
    data: data
  })
}

// 按库位删除
export function configDel(data) {
  return request({
    url: 'storehouse/warehousingSon/configDel',
    method: 'post',
    data: data
  })
}
// 一键入库
export function goStock(data) {
  return request({
    url: 'storehouse/warehousingSon/goStock',
    method: 'post',
    data: data
  })
}
// 快速出库
export function fastOut(data) {
  return request({
    url: 'storehouse/warehouseOutSon/fastOut',
    method: 'post',
    data: data
  })
}

export function warehousingPrint(data) {
  return request({
    url: 'storehouse/warehousing/print',
    method: 'post',
    data: data
  })
}

export function createTray(data) {
  return request({
    url: 'storehouse/warehousingSon/createTray',
    method: 'post',
    data: data
  })
}

export function getConversionList(data) {
  return request({
    url: '/storehouse/tray/conversionList',
    method: 'post',
    data: data
  })
}

export function getSurplus(data) {
  return request({
    url: '/storehouse/tray/surplus',
    method: 'post',
    data: data
  })
}

export function getWarehouse() {
  return request({
    url: '/storehouse/project/warehouse',
    method: 'get'
  })
}

export function getProjecte(id) {
  return request({
    url: '/storehouse/project/warehouse/' + id,
    method: 'get'
  })
}

export function getKwList(id) {
  return request({
    url: '/storehouse/warehousingSon/projectWarehouseConfig/' + id,
    method: 'get'
  })
}

export function getProjectClientKwList(id) {
  return request({
    url: '/storehouse/warehousing/projectWarehouseConfig/' + id,
    method: 'get'
  })
}

export function getProvider() {
  return request({
    url: '/storehouse/project/provider',
    method: 'get'
  })
}

// 库存操作记录
export function inventoryOperationRecordList(data) {
  return request({
    url: 'storehouse/inventoryOperationRecord/index',
    method: 'get',
    params: data
  })
}

// 库存操作记录导出
export function exportInventoryOperationRecord(params ) {
  return request({
    url: 'storehouse/inventoryOperationRecord/export',
    method: 'get',
    params
  })
}

export function exportExcel(data) {
  return request({
    url: 'storehouse/warehouseOut/exportExcel/' + data,
    method: 'get'
  })
}
export function exportPdf(data) {
  return request({
    url: 'storehouse/warehouseOut/exportPdf/' + data,
    method: 'get'
  })
}
export function exportPdf1(data) {
  return request({
    url: 'storehouse/warehouseOut/exportPdf1/' + data,
    method: 'get'
  })
}

export function exportData(data) {
  return request({
    url: '/storehouse/warehouseOut/exportData/' + data,
    method: 'get'
  })
}

export function get_settlement(data) {
  return request({
    url: '/storehouse/project/get_settlement/' + data,
    method: 'get'
  })
}

export function getAllWarehousingNo() {
  return request({
    url: '/storehouse/warehousing/getAllWarehousingNo',
    method: 'get'
  })
}

export function exportDeliver(data) {
  return request({
    url: '/storehouse/warehouseOut/exportDeliver/' + data,
    method: 'get'
  })
}

export function exportOrders(data) {
  return request({
    url: '/storehouse/warehouseOut/exportWarehouseOut',
    method: 'post',
    data: data
  })
}
